package com.zhanghaijun.createCode.junit;

import com.zhanghaijun.createCode.util.PrintUtil;
import org.junit.*;

/**
 * Created by zhanghaijun on 15/7/22.
 */
public class Junit4 {

    @BeforeClass
    public static void allocateBigRes(){
        PrintUtil.println("分配大型资源");
    }

    @Before
    public void allocateRes(){
        PrintUtil.println("分配资源");
    }

    @Test
    public void getJunit4HelloWorld(){
        PrintUtil.println("hello world");
    }

    @Test
    public void getJunit4HelloWorldAgain(){
        PrintUtil.println("hello world again");
    }

    @After
    public void recyclingRes(){
        PrintUtil.println("回收资源");
    }

    @AfterClass
    public static void recyclingBigRes(){
        PrintUtil.println("回收大型资源");
    }
}
